package com.yijiankang.threaddemo.example.stableobject;

public class VolitileTest implements Runnable {

    private static  int i =0;
    static VolitileTest volitileTest = new VolitileTest();
    static  boolean flag = false;
    @Override
    public void run() {
            while(flag){
                System.out.println(111);
            }
    }


    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(new VolitileTest());
        t1.start();
        flag = true;
    }



}
